import {RouteRecordRaw } from 'vue-router'
import BaseLayout from '../layouts/BaseLayout.vue';
export const routes: Array<RouteRecordRaw> = [
    {
      path: '/',
      redirect: '/system'
    }, {
      path: '/system',
      redirect: '/system/index',
      component: BaseLayout,
      name: 'home',
      meta: { title: '工作空间'},
      children: [
        {
          path: '/system/index',
          component: () => import('../views/sys/index/index.vue'),
          meta: { title: '控制台'},
        }, {
          path: '/oas/doc/post/list',
          component: () => import('../views/oas/doc/post/list.vue'),
          meta: { title: '发文列表', requireAuth: true },
        },{
          path: '/cms/content/list',
          component: () => import('../views/cms/content/list.vue'),
          meta: { title: '内容管理', requireAuth: true },
        },
      ]
    }, {
      path: '/login',
      component: () => import('../views/login/index.vue'),
      meta: {
        title: '登录',
      },
    }, {
      path: '/:path(.*)*',
      name: 'notFound',
      component: () => import('../views/error/404.vue'),
      meta: {
        title: '404',
      },
    }, {
      path: '/401',
      name: 'noPower',
      component: () => import('../views/error/401.vue'),
      meta: {
        title: '401',
      },
    },
  ];
  